#include <fstream>
#include "BinHeap.h"

using namespace std;

int main(){
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	BinomialHeap<int, int> bHeap(10000, -10000);
	fin >> bHeap;
	list < BinomialHeap<int, int>::Node* > l = bHeap.getNodesList();
	for (auto itr : l) {
		cout << itr;
	}
	cout << "\n";
	while (!bHeap.isEmpty()) {
		cout << bHeap << endl;
		bHeap.binomialHeapExtractMin();
	}
	fout.close();
	fin.close();
	return 0;
}